package pref.junx.flybird.activity.grou_msg;


import java.util.List;

import pref.junx.flybird.api.HttpMethosds;
import pref.junx.flybird.entity.FriendShip;
import pref.junx.flybird.entity.Reg_user;
import pref.junx.flybird.entity.Register_result;
import pref.junx.flybird.entity.ResultBean;
import pref.junx.flybird.entity.User_idea;
import pref.junx.flybird.tools.RxSchedulers;
import rx.Observable;

/**
 * Created by 半生瓜 on 2017/8/7.
 */

public class Grou_msg_Model implements Grou_msg_Conteact.Model  {
    @Override
    public Observable<Register_result> getregisterModel(Reg_user reg_user) {
        return HttpMethosds.getInstance().retrofitServicel
                .regsiter(reg_user)
                .compose(RxSchedulers.io_main());
    }

    @Override
    public Observable<ResultBean<Boolean>> deleteEvent(FriendShip f) {
        return HttpMethosds.getInstance().retrofitServicel
                .deleteFri(f)
                .compose(RxSchedulers.io_main());
    }

    @Override
    public Observable<ResultBean<List<User_idea>>> getUser(int id) {
        return HttpMethosds.getInstance().retrofitServicel
                .getUser(id)
                .compose(RxSchedulers.io_main());
    }


}
